package ar.com.fiuba.ElectronicCircuitAnalyst.domain.api;

import java.util.List;

import ar.com.fiuba.ElectronicCircuitAnalyst.application.api.dto.ConnectionDto;
import ar.com.fiuba.ElectronicCircuitAnalyst.domain.exceptions.CircuitElementNotFoundException;
import ar.com.fiuba.ElectronicCircuitAnalyst.domain.exceptions.LeadConnectionLimitReachedException;

/**
 * Interface for a connection factory.
 * 
 */
public interface ConnectionFactory {

	/**
	 * Method to make a connection with the given parameters in the circuit
	 * provided.
	 * 
	 * @param data
	 *            the connection DTO.
	 * @param circuitElements
	 *            the circuit elements to be connected.
	 * @return the connection inside the main circuit.
	 * @throws CircuitElementNotFoundException
	 *             if an element in the connection is not found.
	 * @throws LeadConnectionLimitReachedException 
	 */
	public Connection makeConnection(ConnectionDto data, List<CircuitElement> circuitElements)
			throws CircuitElementNotFoundException, LeadConnectionLimitReachedException;
}
